YNQ  YNQ-1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Shares Management

Functions

NQ_INT csAddShareA (const NQ_CHAR *name, const NQ_CHAR *path, NQ_BOOL printQueue, const NQ_CHAR *comment, const NQ_CHAR *reserved)
 
NQ_INT csAddShare (const NQ_WCHAR *name, const NQ_WCHAR *path, NQ_BOOL printQueue, const NQ_WCHAR *comment, const NQ_CHAR *reserved)
 
NQ_INT csRemoveShareA (const NQ_CHAR *name)
 
NQ_INT csRemoveShare (const NQ_WCHAR *name)
 
NQ_INT csSetShareEncryptionA (const NQ_CHAR *name, NQ_BOOL isEncrypted)
 
NQ_INT csSetShareEncryption (const NQ_WCHAR *name, NQ_BOOL isEncrypted)
 

Detailed Description

Function Documentation

NQ_INT csAddShareA ( const NQ_CHAR name,
const NQ_CHAR path,
NQ_BOOL  printQueue,
const NQ_CHAR comment,
const NQ_CHAR reserved 
)

This function adds another share to NQ Server.

Parameters
nameName for new share. This name must not contain the '$' character.
pathLocal path to the share root.
printQueueFALSE for file system, TRUE for print queue.
commentShare description as a free text.
reservedFor future use. This value is currently ignored and may be any, including NULL.
Returns
value meaning
0 Success
-1 the DB was not initialized
-2 parameter error (string too long)
-3 share table full
-6 share already exists
Note
  • This function should be called from the context of NQ Server thread.
  • It is recommended to sue it on NQ Server startup only.
  • This is an ASCII version of csAddShare().
NQ_INT csAddShare ( const NQ_WCHAR name,
const NQ_WCHAR path,
NQ_BOOL  printQueue,
const NQ_WCHAR comment,
const NQ_CHAR reserved 
)

This function adds another share to NQ Server. Parameters

Parameters
nameName for new share. This name must not contain the '$' character.
pathLocal path to the share root.
printQueueFALSE for file system, TRUE for print queue.
commentShare description as a free text.
reservedFor future use. This value is currently ignored and may be any, including NULL.
Returns
value meaning
0 Success
-1 the DB was not initialized
-2 parameter error (string too long)
-3 share table full
-6 share already exists
Note
  • This function should be called from the context of NQ Server thread.
  • It is recommended to sue it on NQ Server startup only.
NQ_INT csRemoveShareA ( const NQ_CHAR name)

This function removes an existing share from NQ Server.

Parameters
nameName for the share to remove. This name must not contain the '$' character.
Returns
value meaning
0 Success
-1 NQ Server was not initialized
-2 parameter error (share not found)
Note
  • This function should be called from the context of NQ Server thread.
  • It is recommended to sue it on NQ Server startup only.
  • This is an ASCII version of csRemoveShare().
NQ_INT csRemoveShare ( const NQ_WCHAR name)

This function removes an existing share from NQ Server.

Parameters
nameName for the share to remove. This name must not contain the '$' character.
Returns
value meaning
0 Success
-1 NQ Server was not initialized
-2 parameter error (share not found)
Note
  • This function should be called from the context of NQ Server thread.
  • It is recommended to sue it on NQ Server startup only.
NQ_INT csSetShareEncryptionA ( const NQ_CHAR name,
NQ_BOOL  isEncrypted 
)

This function enables or disables encryption for a particular share. An encrypted share may be only accessed over SMB3.0.

This function is applicable to any share regardless of way it was created. When called with NULL share name parameter global encryption is applied.

Parameters
nameShare name or NULL.
isEncryptedTRUE to enable encryption, FALSE to disable encryption. NQ does not consider the previous encryption status.
Returns
value meaning
0 Success
-1 NQ Server was not initialized
-2 parameter error (share not found)
Note
  • To enable or disable global encryption use NULL as share name parameter
  • This function should be called from the context of NQ Server thread. It is recommended to issue it on NQ Server startup only.
  • This function is available when NQ was compiled with SMB3 support as designated by the UD_NQ_INCLUDESMB3 parameter.
  • This is an ASCII version of csSetShareEncryption()
NQ_INT csSetShareEncryption ( const NQ_WCHAR name,
NQ_BOOL  isEncrypted 
)

This function enables or disables encryption for a particular share. An encrypted share may be only accessed over SMB3.0.

This function is applicable to any share regardless of way it was created. When called with NULL share name parameter global encryption is applied.

Parameters
nameShare name or NULL.
isEncryptedTRUE to enable encryption, FALSE to disable encryption. NQ does not consider the previous encryption status.
Returns
value meaning
0 Success
-1 NQ Server was not initialized
-2 parameter error (share not found)
Note
  • To enable or disable global encryption use NULL as share name parameter
  • This function should be called from the context of NQ Server thread. It is recommended to issue it on NQ Server startup only.
  • This function is available when NQ was compiled with SMB3 support as designated by the UD_NQ_INCLUDESMB3 parameter.